#ifndef BITMAP_H_
#define BITMAP_H_

#include <types.h>

#define CHECK_BIT(base, bit) ( ( base[ DIV_DOWN( bit, (sizeof(byte)*8) ) ] & (1 << (bit % (sizeof(byte)*8))) ) >> (bit % (sizeof(byte)*8)))
#define SET_BIT(base, bit) ( base[ DIV_DOWN( bit, (sizeof(byte)*8) ) ] = ( base[ DIV_DOWN( bit, (sizeof(byte)*8) ) ] | (1 << (bit % (sizeof(byte)*8)))))
#define CLEAR_BIT(base, bit) ( base[ DIV_DOWN( bit, (sizeof(byte)*8) ) ] = ( base[ DIV_DOWN( bit, (sizeof(byte)*8) ) ] & ~(1 << (bit % (sizeof(byte)*8)))))

#endif /*BITMAP_H_*/
